package com.hqj.study.controller;

import com.hqj.study.dao.AccountDao;
import com.hqj.study.pojo.Account;
import com.hqj.study.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author yd
 * @version 1.0
 * @date 2020/3/28 0028 黄啟军
 */
@RestController
public class AccountController {
    @Autowired
    AccountService accountService;
    @ResponseBody
    @RequestMapping("/test")
    public List<Account> test(){
       return accountService.findAll();
    }
}
